#include <REGX52.H>
#include"Delay.h"
#include"key.h"
#include"Nixie.h"
#include"Timer0.h"

sbit DA = P2^1;

unsigned char T,C;
unsigned int i;
void main()
{
	Timer0_Init();
 	while(1)
	{
		for(i=0;i<100;i++)
		{
			T=i;
			Delay(10);
		}
		for(i=100;i>0;i--)
		{
			T=i;
			Delay(10);
		}
	}
}

void Timer0_Routine() interrupt 1
{
	TL0 = 0x9C;		
	TH0 = 0xFF;	
  C++;
  C%=100;
  if(C<T)
	{
		DA=1;
	}	
	else
	{
		DA=0;
	}
}